<?php

require_once 'GameUser.php';
/**
 * Description of MancalaTable
 *
 * @author alexey.ogarkov
 */
class GameBoard {    
    private $first;
    private $second;    
    private $currentUser;
    
    function __construct() {
        $this->first = new GameUser();
        $this->currentUser = $this->first;
        $this->second = new GameUser();
    }
    
    public function getFirst() {
        return $this->$first;
    }
    
    public function getSecond() {
        return $this->$second;
    }        
    
    public function getCurrentUser() {
        return $this->currentUser;
    }
    
    public function toggleUsers() {
        if ( $this->currentUser == $this->first) {
            $this->currentUser = $this->second;
        } else {
            $this->currentUser = $this->first;
        }
    }

}

?>
